<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="/css/animate.css" rel="stylesheet">
<link href="/css/layui.css" rel="stylesheet">
<link href="/css/style.css?v=4.1.0" rel="stylesheet">
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="id" name="id" th:value="${content.id}" type="hidden">
                        <input id="typeId" name="typeId" th:value="${content.typeId}" class="form-control"
                               type="hidden">

                        <div class="form-group">
                        <label class="col-sm-3 control-label">公司名称：</label>
                        <div class="col-sm-8">
                            <input id="companyName" name="companyName" th:value="${content.companyName}" class="form-control"
                                   type="text" />
                        </div>
                    </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">公司地址：</label>
                            <div class="col-sm-8">
                                <input id="companyAddress" name="companyAddress" th:value="${content.companyAddress}" class="form-control"
                                       type="text" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">全国统一联系电话：</label>
                            <div class="col-sm-8">
                                <input id="title" name="title" th:value="${content.title}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">qq账号：</label>
                            <div class="col-sm-8">
                                <input id="enTitle" name="enTitle" th:value="${content.enTitle}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">微信图片：</label>
                            <div class="col-sm-8">
                                <div class="col-sm-8">
                                    <img id="imgLogo"  style="width:100px;display:block;"
                                         th:src="@{${content.imageUrl}}">
                                    <input type="hidden"id="imageUrl" name="imageUrl" th:value="${content.imageUrl}">
                                    <button type="button" class="btn btn-success" id="btnUpload">
                                        <i class="fa fa-cloud"></i>上传文件
                                    </button>
                                </div>

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">微博地址：</label>
                            <div class="col-sm-8">
                                <input id="title2" name="title2" th:value="${content.title2}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">右侧联系电话：</label>
                            <div class="col-sm-8">
                                <input id="enTitle2" name="enTitle2" th:value="${content.enTitle2}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">公司坐标经度：</label>
                            <a target="_blank" href="http://api.map.baidu.com/lbsapi/getpoint/index.html">坐标获取地址</a>
                            <div class="col-sm-8">
                                <input id="longitude" name="longitude" th:value="${content.longitude}" class="form-control"
                                       type="text" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">公司坐标纬度：</label>
                            <div class="col-sm-8">
                                <input id="latitude" name="latitude" th:value="${content.latitude}" class="form-control"
                                       type="text" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">版权备案号：</label>
                            <div class="col-sm-8">
                                <textarea id="content" name="content" th:text="${content.content}" class="form-control" rows="5"></textarea>
                                <script>
                                    editor = CKEDITOR.replace('content');
                                </script>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" src="/js/appjs/webshow/brand/edit.js">
</script>
<script src="/js/content.js?v=1.0.0"></script>
<script src="/js/layui.js"></script>
<script src="/js/plugins/clipboard/clipboard.min.js"></script>
<script src="/js/plugins/layer/layer.min.js"></script>
<script type="text/javascript">

    layui.use('upload', function () {
        var upload = layui.upload;
        //执行实例
        var uploadInst = upload.render({
            elem: '#btnUpload', //绑定元素
            url: '/common/sysFile/imgupload', //上传接口
            size: 1000,
            accept: 'file',
            done: function (r) {
                $("#imgLogo").attr("src",r.data);
                $("#imageUrl").val(r.data);

            },
            error: function (r) {
                layer.msg(r.msg);
            }
        });
    });

</script>
</body>
</html>
